require('./PageQualitydetail.styl');
import { Control } from 'react-keeper'
const reactMixin = require('react-mixin');
const Actions = require('./actions');
const Store = require('./store');
const RollUp = require('components/rollup');
const ui = require('clientConfig/util/jsapi/ui');
class Qualitydetail extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
           listData:[]
        };
    }

    render() {
        return (
            <div className="qualitydetail">
                {this.state.listData.length>0?this.state.listData.map((item,index)=>{
                    return (<RollUp data={item} />);
                }):<div className="t-FAC t-SMT100">暂无节点数据</div>}           
            </div>
        );
    }

    componentWillMount() {
        ui.setTitle({ title:"节点成果提交情况" });
    }

    componentDidMount() {
        let process_id = Control.state.process_id;
        Actions.fetch({process_id})
    }

    componentWillReceiveProps(nextProps) {
    }

    shouldComponentUpdate(nextProps, nextState) {
        return true;
    }

    componentWillUpdate(nextProps, nextState) {
    }

    componentDidUpdate(prevProps, prevState) {
    }

    componentWillUnmount() {
    }
}

reactMixin.onClass(Qualitydetail, Reflux.connect(Store));

module.exports = Qualitydetail;
